{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b8bd7a99-24dd-432c-9e5a-0b6085396674",
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "aedt_process_id = \"PROCESSID\"\n",
    "version = \"AEDTVERSION\"\n",
    "print(\"Loading the PyAEDT Console.\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6232be8729ad9638",
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "if version > \"2023.1\":\n",
    "    from ansys.aedt.core import Desktop\n",
    "    from ansys.aedt.core import settings\n",
    "\n",
    "    settings.use_grpc_api = True\n",
    "else:\n",
    "    from pyaedt import Desktop\n",
    "    from pyaedt import settings\n",
    "\n",
    "    settings.use_grpc_api = False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a9421de3-425b-4040-b5d2-bb58102e8303",
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "desktop = Desktop(\n",
    "    specified_version=version,\n",
    "    aedt_process_id=aedt_process_id,\n",
    "    new_desktop_session=False,\n",
    "    non_graphical=False,\n",
    "    close_on_exit=False,\n",
    "    student_version=False,\n",
    ")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
